{% extends 'backend.html' %}
{% block backend_main %}
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">回收站</h3>
        </div>
        <div class="panel-body">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>标题</th>
                    <th>发布时间</th>
                    <th>点赞数</th>
                    <th>点踩数</th>
                    <th>评论数</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {% for article in article_all %}
                    <tr>
                        <th scope="row">{{ forloop.counter }}</th>
                        <td>
                            <a href="{% url 'article:detail' request.user.username article.pk %}">{{ article.title|truncatechars:20 }}...</a>
                        </td>
                        <td>{{ article.create_time|date:'Y-m-d H:i:s' }}</td>
                        <td>{{ article.up_count }}</td>
                        <td>{{ article.down_count }}</td>
                        <td>{{ article.comment_count }}</td>
                        <td>
                            <button class="btn btn-warning"><a
                                    href="{% url 'backend:revoke' article.pk %}">撤销</a>
                            </button>
                        </td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
{% endblock %}